﻿<%@ Page Title="Histórico dos Alunos" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="HistoricoAluno.aspx.cs" Inherits="AcadPosApp.ControlarMatricula.HistoricoAluno" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../Scripts/jquery-2.1.0.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.reveal.js" type="text/javascript"></script>
    <link href="../css/reveal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style3
        {
            width: 729px;
        }
        .style4
        {
            width: 100%;
        }
        .style7
        {
            font-weight: 700;
        }
        .style8
        {
            font-weight: normal;
        }
        .style9
        {
            font-weight: 700;
            width: 130px;
        }
        .style11
        {
            font-weight: 700;
            width: 117px;
        }
        .style12
        {
            width: 117px;
        }
        .form-inline
        {
            font-family: Calibri;
            font-size: 11pt;
        }
        .style13
        {
            width: 130px;
        }
    </style>
    <script type="text/javascript">
        function preencheObs(observacao, label) {
            label.value = observacao;
        }
        function abreJanela() {

            $(function () {

                $("#myModal").reveal({
                    animation: 'fadeAndPop',                   //fade, fadeAndPop, none
                    animationspeed: 300,                       //how fast animtions are
                    closeonbackgroundclick: true,              //if you click background will modal close?
                    dismissmodalclass: 'close-reveal-modal'    //the class of a button or element that will close an open modal
                });
            });

        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlHistorico" runat="server" GroupingText="Disciplinas Cursadas/Cursando">
                <asp:GridView ID="gvwDisciplinasAluno" runat="server" AutoGenerateColumns="False"
                    CssClass="mGrid" DataKeyNames="ID_MATRICULA_DISCIPLINA,ID_MATRICULA,ID_DISCIPLINA,ID_TURMA"
                    EmptyDataText="Dados não localizados..." GridLines="Vertical" Width="95%" AllowPaging="True"
                    OnPageIndexChanging="gvwDisciplinasAluno_PageIndexChanging" OnSelectedIndexChanged="gvwDisciplinasAluno_SelectedIndexChanged"
                    OnRowDataBound="gvwDisciplinasAluno_RowDataBound" 
                    onselectedindexchanging="gvwDisciplinasAluno_SelectedIndexChanging">
                    <AlternatingRowStyle BackColor="#D3D3D3" />
                    <Columns>
                        <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />
                        <asp:BoundField DataField="NOME_DISCIPLINA" HeaderText="Disciplina">
                            <HeaderStyle HorizontalAlign="Center" Width="65%" />
                            <ItemStyle HorizontalAlign="Left" Width="65%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CH_HORARIA" HeaderText="C.H.">
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Left" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TOTAL_FALTAS" HeaderText="Faltas" DataFormatString="{0:p}">
                            <HeaderStyle HorizontalAlign="Center" Width="1" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NOTA1" HeaderText="Nota 1">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NOTA2" HeaderText="Nota 2">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="COD_TURMA" HeaderText="Turma">
                            <HeaderStyle HorizontalAlign="Center" Width="4%" />
                            <ItemStyle HorizontalAlign="Center" Width="4%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="JUSTIFICATIVA" HeaderText="JUSTIFICATIVA">
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Justif.">
                            <HeaderStyle />
                            <ItemStyle HorizontalAlign="Center" Width="35px" />
                            <ItemTemplate>
                                <a href="javascript:void(0);">
                                    <asp:Image ID="Image1" runat="server" Height="24px" Width="24px" src="../Imagens/justificativa.png" Visible="false" /></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                <br />
                <div>
                    <table class="form-inline" align="right">
                        <tr>
                            <td class="style7" colspan="3">
                                Legenda
                            </td>
                            <td class="style9">
                                &nbsp;
                            </td>
                            <td class="style7">
                                &nbsp;
                            </td>
                            <td class="style11">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td class="style7">
                                AP:
                            </td>
                            <td class="style7">
                                <b><span class="style8">Aprovado por Média</span></b>
                            </td>
                            <td>
                                <strong>&nbsp;RF: </strong>
                            </td>
                            <td class="style13">
                                Reprovado por Faltas
                            </td>
                            <td>
                                <strong>TR:</strong>
                            </td>
                            <td class="style12">
                                Trancada
                            </td>
                        </tr>
                        <tr>
                            <td class="style7">
                                RM:
                            </td>
                            <td>
                                Reprovado por Média
                            </td>
                            <td>
                                <strong>&nbsp;CA:</strong>
                            </td>
                            <td class="style13">
                                Cancelada
                            </td>
                            <td>
                                <strong>AE:</strong>
                            </td>
                            <td class="style12">
                                Aproveitamento
                            </td>
                        </tr>
                    </table>
                </div>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnHistorico" runat="server" formnovalidate="formnovalidate" Text="Histórico"
                        OnClick="btnHistorico_Click" />
                </div>
                <br />
                <asp:Panel ID="pnlAcoesBotoes" runat="server" Visible="false">
                    <div class="legenda">
                        <asp:Button ID="btnJustificaFaltas" runat="server" formnovalidate="formnovalidate"
                            Text="Justificar Faltas" OnClick="btnJustificaFaltas_Click" Width="140px" />
                        &nbsp;<asp:Button ID="btnMatriculaDisciplina" runat="server" formnovalidate="formnovalidate"
                            Text="Matrícula Disciplina" OnClick="btnMatriculaDisciplina_Click" Width="150px" />
                    </div>
                    <br />
                </asp:Panel>
            </asp:Panel>
            <br />
            <asp:Panel ID="pnlJustificaFaltas" runat="server" GroupingText="Cadastro de Justificativa de Faltas"
                Visible="False">
                <table class="form-inline">
                    <tr>
                        <td class="style3">
                            Disciplina:&nbsp;
                            <asp:Label ID="lblDisciplina" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            Justificativa&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:TextBox ID="txtJustificativa" MaxLength="100" required runat="server" Height="100px"
                                TextMode="MultiLine" Width="45%"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnConfirmarJustFalta" runat="server" Text="Confirmar" OnClick="btnConfirmarJustFalta_Click"
                        Width="100px" />
                    &nbsp;<asp:Button ID="btnCancelarJustFalta" formnovalidate="formnovalidate" runat="server"
                        Text="Cancelar" OnClick="btnCancelarJustFalta_Click" Width="100px" />
                </div>
                <br />
            </asp:Panel>
            <br />
            <asp:Panel ID="pnlMatriculaDisciplinaPendente" runat="server" GroupingText="Matrícula em Disciplina Pendentes"
                Visible="False">
                <asp:GridView ID="gvwDisciplinasAlunoPendentes" runat="server" AutoGenerateColumns="False"
                    CssClass="mGrid" DataKeyNames="ID_MATRICULA_DISCIPLINA,ID_MATRICULA,ID_DISCIPLINA,ID_TURMA,NOSSO_NUMERO"
                    EmptyDataText="Dados não localizados..." GridLines="Vertical" Width="950px" AllowPaging="True"
                    OnRowCommand="gvwDisciplinasAlunoPendentes_RowCommand" OnRowCreated="gvwDisciplinasAlunoPendentes_RowCreated"
                    OnRowDataBound="gvwDisciplinasAlunoPendentes_RowDataBound">
                    <AlternatingRowStyle BackColor="#D3D3D3" />
                    <Columns>
                        <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />--%>
                        <asp:BoundField DataField="NOME_DISCIPLINA" HeaderText="Disciplina">
                            <HeaderStyle HorizontalAlign="Center" Width="65%" />
                            <ItemStyle HorizontalAlign="Left" Width="65%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CH_HORARIA" HeaderText="C.H.">
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Left" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TOTAL_FALTAS" HeaderText="Faltas" DataFormatString="{0:p}">
                            <HeaderStyle HorizontalAlign="Center" Width="1" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NOTA1" HeaderText="Nota 1">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NOTA2" HeaderText="Nota 2">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="COD_TURMA" HeaderText="Turma">
                            <HeaderStyle HorizontalAlign="Center" Width="4%" />
                            <ItemStyle HorizontalAlign="Center" Width="4%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Comp. Matrícula" ShowHeader="False">
                            <ItemTemplate>
                                <abbr title="Comp. Matrícula">
                                    <asp:ImageButton ID="CompMatricula" formnovalidate="formnovalidate" runat="server"
                                        CausesValidation="false" CommandName="RelCompMatricula" ImageUrl="~/Imagens/print.png"
                                        Text="" Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="10%" />
                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Boleto" ShowHeader="False">
                            <ItemTemplate>
                                <abbr>
                                    <asp:ImageButton ID="ImgBoleto" runat="server" CausesValidation="false" CommandName="boleto"
                                        formnovalidate="formnovalidate" ImageUrl="~/Imagens/print.png" Text="Boleto"
                                        Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
            </asp:Panel>
            <asp:Panel ID="pnlDisciplinasOfertadas" runat="server" GroupingText="Realizar Matrícula em Disciplina Pendente"
                Visible="False">
                <table class="form-inline">
                    <tr>
                        <td class="style3">
                            Disciplina:
                            <asp:Label ID="lblDisciplinaPendente" runat="server"></asp:Label>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Estado
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            <asp:DropDownList ID="ddlCadEstado" runat="server" Width="80px" AutoPostBack="True"
                                OnSelectedIndexChanged="ddlCadEstado_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Polo
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            <asp:DropDownList ID="ddlCadPolo" runat="server" Enabled="False" Width="440px" OnSelectedIndexChanged="ddlCadPolo_SelectedIndexChanged"
                                AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
                <br />
                <asp:GridView ID="gvwDisciplinasOfertadas" runat="server" AutoGenerateColumns="False"
                    CssClass="mGrid" DataKeyNames="ID_TURMA,ID_MATRIZ_CURRICULAR,ID_DISCIPLINA" EmptyDataText="Dados não localizados..."
                    GridLines="Vertical" Width="1100px" AllowPaging="True" Visible="false">
                    <AlternatingRowStyle BackColor="#D3D3D3" />
                    <Columns>
                        <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />
                        <asp:BoundField DataField="ID_CURSO" HeaderText="Código">
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CURSO" HeaderText="Curso">
                            <HeaderStyle HorizontalAlign="Center" Width="20%" />
                            <ItemStyle HorizontalAlign="Left" Width="20%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CURRICULO" HeaderText="Currículo">
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MODULO" HeaderText="Módulo">
                            <HeaderStyle HorizontalAlign="Center" Width="8%" />
                            <ItemStyle HorizontalAlign="Center" Width="8%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="COD_TURMA" HeaderText="Turma">
                            <HeaderStyle HorizontalAlign="Center" Width="4%" />
                            <ItemStyle HorizontalAlign="Center" Width="4%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DISCIPLINA" HeaderText="Disciplina">
                            <HeaderStyle HorizontalAlign="Center" Width="37%" />
                            <ItemStyle HorizontalAlign="Left" Width="37%" />
                        </asp:BoundField>
                        <%--  <asp:BoundField DataField="VALOR" HeaderText="Valor" DataFormatString="{0:c}">
                        <HeaderStyle HorizontalAlign="Center" Width="7%" />
                        <ItemStyle HorizontalAlign="Center" Width="7%" />
                    </asp:BoundField>--%>
                        <asp:BoundField DataField="DATA_INICIO" HeaderText="Início Disc.">
                            <HeaderStyle HorizontalAlign="Center" Width="10%" />
                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DATA_FIM" HeaderText="Fim Disc.">
                            <HeaderStyle HorizontalAlign="Center" Width="10%" />
                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                        </asp:BoundField>
                    </Columns>
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                <div class="legenda">
                    <asp:Button ID="btnConfirmarMatriculaPendente" runat="server" Text="Confirmar" OnClick="btnConfirmarMatriculaPendente_Click" />
                    <asp:Button ID="btnCancelarMatriculaPendente" formnovalidate="formnovalidate" runat="server"
                        Text="Cancelar" OnClick="btnCancelarMatriculaPendente_Click" />
                </div>
            </asp:Panel>
            <br />
            <div class="legenda" style="text-align: center;">
                <asp:Button ID="btnVoltarMatricula" formnovalidate="formnovalidate" runat="server"
                    Text="Voltar para Matrícula" Style="text-align: left" OnClick="btnVoltarMatricula_Click" />
            </div>
            <div id="myModal" class="reveal-modal">
                <span style="color: #006400; font-weight: bold; font-size: x-large;">Justificativa:</span>
                <p>
                    <%--<asp:Label ID="lbl1" runat="server" >dialog</asp:Label>--%>
                    <asp:TextBox ID="lblJustificativa" runat="server" TextMode="MultiLine" Height="123px"
                        Width="357px" BorderColor="Transparent" BackColor="White" ReadOnly="True"></asp:TextBox>
                </p>
                <a class="close-reveal-modal">&#215;</a> <span class="canto"></span>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnHistorico" />
            <asp:PostBackTrigger ControlID="gvwDisciplinasAlunoPendentes" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
